import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';

import {MatIconModule} from '@angular/material/icon';
import {MatMenuModule} from '@angular/material/menu';
import {CdkTreeModule} from '@angular/cdk/tree';
import {MatButtonModule} from '@angular/material/button';
import {MatTreeModule} from '@angular/material/tree';

import {BaseSharedModule} from '@base/shared.module';

import {BaseConfirmDialogModule, BaseSidebarModule, BreadcrumbModule} from '@base/components';

import {RolesComponent} from './roles.component';
import {SettingRolesService} from './roles.service';
import {RolesFormDialogComponent} from './roles-form/roles-form.component';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatInputModule} from '@angular/material/input';
import {MatDialogModule} from '@angular/material/dialog';
import {MatSelectModule} from '@angular/material/select';
import {MatListModule} from '@angular/material/list';

import {SettingPermitService} from '../permit/permit.service';
import {MatCheckboxModule} from '@angular/material/checkbox';

const routes: Routes = [
    {
        path: 'basic/permissions/roles',
        component: RolesComponent,
        resolve: {
            data: SettingRolesService,SettingPermitService
        }
    }
];

@NgModule({
    declarations: [
        RolesComponent,
        RolesFormDialogComponent
    ],
    imports: [
        RouterModule.forChild(routes),

        MatIconModule,

        BaseSharedModule,
        BreadcrumbModule,
        BaseSharedModule,
        BaseConfirmDialogModule,
        BaseSidebarModule,
        MatMenuModule,
        CdkTreeModule,
        MatButtonModule,
        MatTreeModule,
        MatToolbarModule,
        MatFormFieldModule,
        MatDatepickerModule,
        MatInputModule,
        MatDialogModule,
        MatSelectModule,
        MatListModule,
        MatCheckboxModule
    ],
    providers: [
        SettingRolesService,
        SettingPermitService
    ],
    entryComponents: [
        RolesFormDialogComponent
    ]
})
export class RolesModule {
}